<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{stockBean.id}"/>
		<f:event type="preRenderView" listener="#{stockBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="View Stock"/>

	<ui:define name="header">
		Stock
	</ui:define>

	<ui:define name="subheader">
		View existing Stock
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:panelGrid columnClasses="label,component,required" columns="3">
			<h:outputLabel for="stockBeanStockUserByModifiedBy" value="User By Modified By:"/>
			<h:link id="stockBeanStockUserByModifiedBy" outcome="/user/view" value="#{stockBean.stock.userByModifiedBy}">
				<f:param name="id" value="#{stockBean.stock.userByModifiedBy.id}"/>
			</h:link>
			<h:outputText/>
			<h:outputLabel for="stockBeanStockUserByCreatedBy" value="User By Created By:"/>
			<h:link id="stockBeanStockUserByCreatedBy" outcome="/user/view" value="#{stockBean.stock.userByCreatedBy}">
				<f:param name="id" value="#{stockBean.stock.userByCreatedBy.id}"/>
			</h:link>
			<h:outputText/>
			<h:outputLabel for="stockBeanStockPhoneNo" value="Phone No:"/>
			<h:link id="stockBeanStockPhoneNo" outcome="/phoneNo/view" value="#{stockBean.stock.phoneNo}">
				<f:param name="id" value="#{stockBean.stock.phoneNo.id}"/>
			</h:link>
			<h:outputText/>
			<h:outputLabel for="stockBeanStockQuantity" value="Quantity:"/>
			<h:outputText id="stockBeanStockQuantity" value="#{stockBean.stock.quantity}"/>
			<h:outputText/>
			<h:outputLabel for="stockBeanStockPricePerUnit" value="Price Per Unit:"/>
			<h:outputText id="stockBeanStockPricePerUnit" value="#{stockBean.stock.pricePerUnit}"/>
			<h:outputText/>
			<h:outputLabel for="stockBeanStockPriceTotal" value="Price Total:"/>
			<h:outputText id="stockBeanStockPriceTotal" value="#{stockBean.stock.priceTotal}"/>
			<h:outputText/>
			<h:outputLabel for="stockBeanStockPurchaseDate" value="Purchase Date:"/>
			<h:outputText id="stockBeanStockPurchaseDate" value="#{stockBean.stock.purchaseDate}"/>
			<h:outputText/>
			<h:outputLabel for="stockBeanStockCreatedOn" value="Created On:"/>
			<h:outputText id="stockBeanStockCreatedOn" value="#{stockBean.stock.createdOn}">
				<f:convertDateTime type="date"/>
			</h:outputText>
			<h:outputText/>
			<h:outputLabel for="stockBeanStockModifiedOn" value="Modified On:"/>
			<h:outputText id="stockBeanStockModifiedOn" value="#{stockBean.stock.modifiedOn}">
				<f:convertDateTime type="date"/>
			</h:outputText>
			<h:outputText/>
			<h:outputLabel for="stockBeanStockTableId" value="Table Id:"/>
			<h:outputText id="stockBeanStockTableId" value="#{stockBean.stock.tableId}"/>
			<h:outputText/>
			<h:outputLabel value="Is Public:"/>
			<h:outputText styleClass="#{stockBean.stock.isPublic ? 'boolean-true' : 'boolean-false'}" value=""/>
			<h:outputText/>
			<h:outputLabel value="Is Empty:"/>
			<h:outputText styleClass="#{stockBean.stock.isEmpty ? 'boolean-true' : 'boolean-false'}" value=""/>
			<h:outputText/>
			<h:outputLabel value="Is Deleted:"/>
			<h:outputText styleClass="#{stockBean.stock.isDeleted ? 'boolean-true' : 'boolean-false'}" value=""/>
			<h:outputText/>
		</h:panelGrid>

		<div class="buttons">
			<h:link value="View All" outcome="search" styleClass="btn btn-primary"/> 
			<h:link value="Edit" outcome="create" includeViewParams="true" styleClass="btn btn-primary"/>
			<h:link value="Create New" outcome="create" styleClass="btn btn-primary"/>
		</div>
	</ui:define>

</ui:composition>